package ru.incoremedia.gwttest.core.client.util;

import com.google.gwt.user.client.Window;
import ru.incoremedia.gwttest.core.client.component.ajaxloaderindicator.AjaxLoaderIndicator;

public class AsyncUtils {
    public static void onFailure(Throwable t) {
        AjaxLoaderIndicator.hide();
        if(t instanceof ru.incoremedia.gwttest.core.client.exception.SecurityException) {
            Window.Location.reload();
        }
    }
    
    public static void onSucess() {
        AjaxLoaderIndicator.hide();
    }
}
